package main

import (
	"encoding/json"
    "fmt"
)

func main() {
    type change struct {
        Index int `json:"index"`
        Armid int `json:"armid"`
    }

    type change_slice struct {
        Changes []change `json:"changes"`
    }

    var msg change_slice

    str := `{"changes": [{"armid": 3, "index": 5}, {"armid": 3, "index": 6}]}`
    err := json.Unmarshal([]byte(str), &msg)
    if err != nil {
        fmt.Println("Can't decode json message", err)
    }
    fmt.Println(msg)

    for _, change := range msg.Changes {
        fmt.Println(change.Armid, change.Index)
    }
}
